package mbp.base;

public class Record2 {
	private Object[] data;
	public Record2(int columns)
	{
		data = new Object[columns];
		for(int i = 0; i<columns; i++)
		{
			data[i] = null;
		}
	}
	
	public Record2(Object[] data)
	{
		this.data = data;
	}
	
	public Object get(int index)
	{
		int length = data.length;
		if(length<1)return null;
		if(index<0)return null;
		if(index>=length)return null;
		
		return data[index];	
	}
	
	public boolean set(int index, Object value)
	{
		int length = data.length;
		if(length<1)return false;
		if(index<0)return false;
		if(index>=length)return false;
		
		data[index] = value;
		return true;
	}

}
